package com.tools.module.sys.enums;

import java.util.ArrayList;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.List;

public enum StatusEnum {
    STATUS_SQ(0,"售前"), STATUS_KFZ(1,"开发中"), STATUS_SH(2,"售后"), STATUS_YTK(3,"已退款");


    private Integer code;
    private String value;

    StatusEnum(Integer code, String value) {
        this.code =  code;
        this.value =  value;
    }


    /**
     * 获取集合List
     * @return
     */
    public static List<HashMap<String,String>> getAdPositionList() {
        List<HashMap<String, String>> list = new ArrayList<>();
        for (StatusEnum statusEnum : EnumSet.allOf(StatusEnum.class)) {
            HashMap<String, String> map = new HashMap<>();
            map.put("code",statusEnum.code.toString());
            map.put("value",statusEnum.value);
            list.add(map);
        }
        return list;
    }
}
